package com.zjy.heath_ms.controller;

import com.zjy.heath_ms.entity.QueryPageBean;
import com.zjy.heath_ms.entity.Result;
import com.zjy.heath_ms.service.CheckGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 项目名 heath_ms
 * 类名  CheckGroupController
 * 作者 lzq
 * 创建时间  2025/5/25 12:34
 */
@RestController
@RequestMapping("/checkGroup")
public class CheckGroupController {
    @Autowired
    private CheckGroupService checkGroupService;

    /**
     * 分页查询检查组
     * @param queryPageBean
     * @return
     */
    @GetMapping
    public Result getCheckGroups(QueryPageBean queryPageBean) {
        return Result.buildSuccess(checkGroupService.findPage(queryPageBean));
    }

    /**
     * 获取所有的检查组
     * @param queryString 查询条件
     * @return
     */
    @GetMapping("/all")
    public Result getAllCheckGroups(String queryString) {
        return Result.buildSuccess(checkGroupService.getAll(queryString));
    }


}
